<?php

namespace Yearnfar\Bundle\CmsBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

/**
 * term
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class term
{
    /**
     * @ORM\OneToMany(targetEntity="post", mappedBy="term")
     */
    private $posts;

    /**
     * @ORM\OneToMany(targetEntity="h5game", mappedBy="term")
     */
    private $h5games;

    /**
     * @ORM\OneToMany(targetEntity="image", mappedBy="term")
     */
    private $images;

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=60)
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="identify", type="string", length=60)
     */
    private $identify;

    /**
     * @var integer
     *
     * @ORM\Column(name="pid", type="integer")
     */
    private $pid;

    /**
     * @var string
     *
     * @ORM\Column(name="description", type="text")
     */
    private $description;

    /**
     * 初始化
     */
    public function __construct()
    {
        $this->posts    = new ArrayCollection();
        $this->h5games  = new ArrayCollection();
        $this->images   = new ArrayCollection();
        $this->comments = new ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return term
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set pid
     *
     * @param integer $pid
     * @return term
     */
    public function setPid($pid)
    {
        $this->pid = $pid;

        return $this;
    }

    /**
     * Get pid
     *
     * @return integer
     */
    public function getPid()
    {
        return $this->pid;
    }

    /**
     * Set identify
     *
     * @param string $identify
     * @return term
     */
    public function setIdentify($identify)
    {
        $this->identify = $identify;

        return $this;
    }

    /**
     * Get identify
     *
     * @return string
     */
    public function getIdentify()
    {
        return $this->identify;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return term
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }

}
